Optimal. Leaf size=131 \[ \frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \cot (c+d x)}{d}-\frac {a \cot ^3(c+d x)}{d}-\frac {3 a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^7(c+d x)}{7 d}-\frac {a \csc (c+d x)}{d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3957, 2917,
2701, 308, 213, 3852} \begin {gather*} -\frac {a \cot ^7(c+d x)}{7 d}-\frac {3 a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^3(c+d x)}{d}-\frac {a \cot (c+d x)}{d}-\frac {a \csc ^7(c+d x)}{7 d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {a \csc (c+d x)}{d}+\frac {a \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 308
Rule 2701
Rule 2917
Rule 3852
Rule 3957
Rubi steps
\begin {align*} \int \csc ^8(c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc ^8(c+d x) \sec (c+d x) \, dx\\ &=a \int \csc ^8(c+d x) \, dx+a \int \csc ^8(c+d x) \sec (c+d x) \, dx\\ &=-\frac {a \text {Subst}\left (\int \frac {x^8}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}-\frac {a \text {Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {a \cot (c+d x)}{d}-\frac {a \cot ^3(c+d x)}{d}-\frac {3 a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^7(c+d x)}{7 d}-\frac {a \text {Subst}\left (\int \left (1+x^2+x^4+x^6+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac {a \cot (c+d x)}{d}-\frac {a \cot ^3(c+d x)}{d}-\frac {3 a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^7(c+d x)}{7 d}-\frac {a \csc (c+d x)}{d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^7(c+d x)}{7 d}-\frac {a \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=\frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \cot (c+d x)}{d}-\frac {a \cot ^3(c+d x)}{d}-\frac {3 a \cot ^5(c+d x)}{5 d}-\frac {a \cot ^7(c+d x)}{7 d}-\frac {a \csc (c+d x)}{d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.04, size = 113, normalized size = 0.86 \begin {gather*} -\frac {16 a \cot (c+d x)}{35 d}-\frac {8 a \cot (c+d x) \csc ^2(c+d x)}{35 d}-\frac {6 a \cot (c+d x) \csc ^4(c+d x)}{35 d}-\frac {a \cot (c+d x) \csc ^6(c+d x)}{7 d}-\frac {a \csc ^7(c+d x) \, _2F_1\left (-\frac {7}{2},1;-\frac {5}{2};\sin ^2(c+d x)\right )}{7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 103, normalized size = 0.79
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {1}{7 \sin \left (d x +c \right )^{7}}-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (-\frac {16}{35}-\frac {\left (\csc ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\csc ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\csc ^{2}\left (d x +c \right )\right )}{35}\right ) \cot \left (d x +c \right )}{d}\) | \(103\) |
default | \(\frac {a \left (-\frac {1}{7 \sin \left (d x +c \right )^{7}}-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (-\frac {16}{35}-\frac {\left (\csc ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\csc ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\csc ^{2}\left (d x +c \right )\right )}{35}\right ) \cot \left (d x +c \right )}{d}\) | \(103\) |
norman | \(\frac {-\frac {a}{448 d}-\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d}-\frac {29 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}-\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {29 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{320 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(158\) |
risch | \(-\frac {2 i a \left (105 \,{\mathrm e}^{11 i \left (d x +c \right )}-210 \,{\mathrm e}^{10 i \left (d x +c \right )}-455 \,{\mathrm e}^{9 i \left (d x +c \right )}+1120 \,{\mathrm e}^{8 i \left (d x +c \right )}+686 \,{\mathrm e}^{7 i \left (d x +c \right )}-2492 \,{\mathrm e}^{6 i \left (d x +c \right )}-274 \,{\mathrm e}^{5 i \left (d x +c \right )}+1360 \,{\mathrm e}^{4 i \left (d x +c \right )}+25 \,{\mathrm e}^{3 i \left (d x +c \right )}-402 \,{\mathrm e}^{2 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )}+48\right )}{105 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(195\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 116, normalized size = 0.89 \begin {gather*} -\frac {a {\left (\frac {2 \, {\left (105 \, \sin \left (d x + c\right )^{6} + 35 \, \sin \left (d x + c\right )^{4} + 21 \, \sin \left (d x + c\right )^{2} + 15\right )}}{\sin \left (d x + c\right )^{7}} - 105 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 105 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + \frac {6 \, {\left (35 \, \tan \left (d x + c\right )^{6} + 35 \, \tan \left (d x + c\right )^{4} + 21 \, \tan \left (d x + c\right )^{2} + 5\right )} a}{\tan \left (d x + c\right )^{7}}}{210 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 281 vs.
\(2 (121) = 242\).
time = 3.87, size = 281, normalized size = 2.15 \begin {gather*} -\frac {96 \, a \cos \left (d x + c\right )^{6} + 114 \, a \cos \left (d x + c\right )^{5} - 450 \, a \cos \left (d x + c\right )^{4} - 250 \, a \cos \left (d x + c\right )^{3} + 670 \, a \cos \left (d x + c\right )^{2} - 105 \, {\left (a \cos \left (d x + c\right )^{5} - a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{3} + 2 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) - a\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 105 \, {\left (a \cos \left (d x + c\right )^{5} - a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{3} + 2 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) - a\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 142 \, a \cos \left (d x + c\right ) - 352 \, a}{210 \, {\left (d \cos \left (d x + c\right )^{5} - d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{3} + 2 \, d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 136, normalized size = 1.04 \begin {gather*} -\frac {21 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 280 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6720 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 6720 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3045 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {6720 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1015 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 168 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7}}}{6720 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.17, size = 128, normalized size = 0.98 \begin {gather*} \frac {2\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {29\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{320\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (64\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {29\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}+\frac {8\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}+\frac {a}{7}\right )}{64\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________